/**
 * 删除硬链接
*/

#include <stdio.h>
#include <stdlib.h>

#include <unistd.h>

int main(int argc, char **argv)
{
    if (argc < 2)
    {
        printf("Usage : %s <file1> ...\n", argv[0]);
        exit(EXIT_FAILURE);
    }

    int i = 1;
    for (; i < argc; ++i)
    {
        if (unlink(argv[i]) != 0)
        {
            perror("unlink error : ");
            exit(EXIT_FAILURE);
        }
    }

    printf("Unlink done!\n");
    return 0;
}